import { createRouter, createWebHashHistory } from 'vue-router'
import BlogBody from '../views/BlogBody/BlogBody.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: BlogBody,
      children: [
        { path: '/index', component: () => import('../views/BlogIndex/BlogIndex.vue') },
        { path: '/map', component: () => import('../views/BlogMap/BlogMap.vue') },
        { path: '/about', component: () => import('../views/BlogAbout/BlogAbout.vue') },
        { path: '/note', component: () => import('../views/BlogNote/BlogNote.vue') }
      ]
    }
    // {
    //   path: '/index',
    //   name: 'index',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/BlogIndex/BlogIndex.vue')
    // }
  ]
})

export default router
